calendar: Fix abbreviated day names
authorNiels De Graef <nielsdegraef@gmail.com>
Tue, 12 Oct 2021 17:29:26 +0000 (19:29 +0200)
committerNiels De Graef <nielsdegraef@gmail.com>
Tue, 12 Oct 2021 17:29:26 +0000 (19:29 +0200)
commitdcbfd61558b73e1ee1adc02f76e25cb6bc7e5d4a
tree92ca9f6bebf3e4573cdad2afbe0dc2820c8252c2
parentd89e82d4a082febfe44d3504786fcab91eab62a3
calendar: Fix abbreviated day names

... if the current locale has a different starting day than Sunday.

This needed 2 fixes:
* We need to take into account `calendar->week_start` when
  creating/adding the appropriate `day_name_labels` field
* we were only calculating `calendar->week_start` _after_ attaching the
  `day_name_labels`, so it was still set to 0 (the default value).

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4338
gtk/gtkcalendar.c